import requset from '@/utils/request'

// 注册请求
export const regAPI = data => {
  return requset.post('/api/reg', data)
}

// 登录请求
export const loginAPI = data => {
  return requset.post('/api/login', data)
}

// 获取用户信息
export const getUserAPI = () => {
  return requset.get('/my/userinfo')
}

// 更新用户信息
export const updatedUserAPI = data => {
  return requset.put('/my/userinfo', data)
}

// 重置密码
export const updatedPwdAPI = data => {
  return requset.patch('/my/updatepwd', data)
}

// 更换头像
export const uplodAPI = data => {
  return requset.patch('/my/update/avatar', { avatar: data })
}
